home *** CD-ROM | disk | FTP | other *** search
- // Borland C++ Builder
- // Copyright (c) 1995, 1999 by Borland International
- // All rights reserved
-
- // (DO NOT EDIT: machine generated header) 'kpSStrm.pas' rev: 4.00
-
- #ifndef kpSStrmHPP
- #define kpSStrmHPP
-
- #pragma delphiheader begin
- #pragma option push -w-
- #include <SysUtils.hpp> // Pascal unit
- #include <Classes.hpp> // Pascal unit
- #include <Windows.hpp> // Pascal unit
- #include <SysInit.hpp> // Pascal unit
- #include <System.hpp> // Pascal unit
-
- //-- user supplied -----------------------------------------------------------
-
- namespace Kpsstrm
- {
- //-- type declarations -------------------------------------------------------
- #pragma option push -b-
- enum TS_BufferState { bsUnknown, bsRead, bsWrite };
- #pragma option pop
-
- class DELPHICLASS TS_BufferStream;
- #pragma pack(push, 4)
- class PASCALIMPLEMENTATION TS_BufferStream : public Classes::TStream
- {
- typedef Classes::TStream inherited;
-
- private:
- Classes::TStream* fStream;
- char *fBuffer;
- char *fBufPtr;
- char *fBufEnd;
- unsigned fBufSize;
- TS_BufferState fState;
- bool fFlushOnDestroy;
- bool fWritten;
- Classes::TNotifyEvent fOnFillBuffer;
- Classes::TNotifyEvent fOnFlushBuffer;
- int __fastcall GetBufPosition(void);
-
- protected:
- virtual bool __fastcall FillBuffer(void);
- virtual bool __fastcall FlushBuffer(void);
- virtual void __fastcall PutBack(char Ch);
- virtual void __fastcall AfterFillBuffer(void);
- virtual void __fastcall AfterFlushBuffer(void);
- __property char * Buffer = {read=fBuffer};
- __property char * BufPtr = {read=fBufPtr};
- __property unsigned BufSize = {read=fBufSize, nodefault};
- __property char * BufEnd = {read=fBufEnd};
- __property int BufPosition = {read=GetBufPosition, nodefault};
- __property TS_BufferState State = {read=fState, nodefault};
- __property Classes::TStream* Stream = {read=fStream};
-
- public:
- __fastcall virtual TS_BufferStream(Classes::TStream* Stream, int BufferSize);
- __fastcall virtual ~TS_BufferStream(void);
- virtual int __fastcall Read(void *Buffer, int Count);
- virtual int __fastcall Write(const void *Buffer, int Count);
- virtual int __fastcall Seek(int Offset, Word Origin);
- bool __fastcall IsEof(void);
- __property bool FlushOnDestroy = {read=fFlushOnDestroy, write=fFlushOnDestroy, default=0};
- __property Classes::TNotifyEvent OnFillBuffer = {read=fOnFillBuffer, write=fOnFillBuffer};
- __property Classes::TNotifyEvent OnFlushBuffer = {read=fOnFlushBuffer, write=fOnFlushBuffer};
- };
-
- #pragma pack(pop)
-
- //-- var, const, procedure ---------------------------------------------------
-
- } /* namespace Kpsstrm */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Kpsstrm;
- #endif
- #pragma option pop // -w-
-
- #pragma delphiheader end.
- //-- end unit ----------------------------------------------------------------
- #endif // kpSStrm
-